package com.sepro.service.impl;

import javax.annotation.Resource;

import com.sepro.dao.PaymentConfigDao;
import com.sepro.entity.PaymentConfig;
import com.sepro.service.PaymentConfigService;
import org.springframework.stereotype.Service;

@Service("paymentConfigServiceImpl")
public class PaymentConfigServiceImpl extends
		BaseServiceImpl<PaymentConfig, String> implements PaymentConfigService {

	@Resource(name = "paymentConfigDaoImpl")
	private PaymentConfigDao paymentConfigDao;
	
	@Resource(name = "paymentConfigDaoImpl")
	public void setBaseDao(PaymentConfigDao paymentConfigDao){
		super.setBaseDao(paymentConfigDao);
	}

	@Override
	public String addPaymentConfig(String name, String logoPath, String desp,
			String bargainorIdName, String bargainorKeyName) {
		String id = null;
		PaymentConfig pc = new PaymentConfig();
		pc.setName(name);
		pc.setLogoPath(logoPath);
		pc.setDesp(desp);
		pc.setBargainorIdName(bargainorIdName);
		pc.setBargainorKeyName(bargainorKeyName);
		id = save(pc);
		return id;
	}
	
}
